package com.itboye.shop.logincontroller;

import android.app.Activity;
import android.content.Intent;

import com.itboye.shop.category.OrderActivity;
import com.itboye.shop.me.PersonalActivity;
import com.itboye.shop.me.adress.AddressListActivity;
import com.itboye.shop.me.qianbao.MyQianBaoActivity;
import com.itboye.shop.me.qianbao.ZhiFuPassSheZhiActivity;
import com.itboye.shop.util.loadutil.IsUtilUid;

/***
 * @author 在登录状态下执行该方法
 */
public class LoginedState implements ILoginState {

	String uid;
	String id;
	// 状态为登录的时候执行本类里的方法

	/**
	 * 个人信息
     */
	@Override
	public void PersonnalInfomaton(Activity activity, Object obj) {
		// TODO Auto-generated method stub
		Intent intent = new Intent(activity, PersonalActivity.class);
		activity.startActivity(intent);
	}

	/**
	 * 我的钱包
     */
	@Override
	public void onQianBao(Activity activity, Object obj) {
		String  pwd= IsUtilUid.isPwd();
		if(pwd==null || pwd==""){
			Intent intent=new Intent(activity,ZhiFuPassSheZhiActivity.class);
			activity.startActivity(intent);
		}else{
			Intent intent = new Intent(activity, MyQianBaoActivity.class);
			activity.startActivity(intent);
		}
	}

	/**
	 * 购物车
	 */
	@Override
	public void onGouWuChe(Activity activity, Object obj) {
//		Intent intent = new Intent(activity, ShopCartActivity.class);
//		activity.startActivity(intent);
	}

	/**
	 * 收货地址
	 */
	@Override
	public void onShouHuoDiZhi(Activity activity, Object obj) {
		Intent intent = new Intent(activity, AddressListActivity.class);
		intent.putExtra("type","2");
		activity.startActivity(intent);
	}

	@Override
	public void onDingDan(Activity activity, Object obj) {
		Intent intent = new Intent(activity, OrderActivity.class);
		activity.startActivity(intent);
	}

}
